﻿@model IEnumerable<tutors_clus.Models.message>
@{
    ViewBag.Title = "Message_ByCourse";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

    <ul data-role="listview" data-inset="true">
        <li data-role="list-divider">Tin nhắn</li>
        @foreach (var item in Model)
        {
            <li><a href="@Url.Action("Detail_Message", "Student", new {id_cou=@item.id_cou,id_msg=@item.id_mes })">
                <h2>@item.title_mes</h2>
                <p>@item.content_mes</p>
                </a>
            </li>
           
        }
    </ul>
    <hr />
    <h3>Thêm tin nhắn</h3>
     @using (Html.BeginForm("Add_msg", "Student", new { id_cou = @ViewBag.id}, FormMethod.Post, new { @encType = "multipart/form-data" }))
                {
                    <input type="text" name="titleMsg" placeholder="Tiêu đề tin nhắn" />
                    <br />
                    <input type="text" name="contentMsg" placeholder="Nội dung tin nhắn"  />
                    <br />
                    <input type="file" multiple="" name="fileuploads" value=" " />
                    <input type="submit" name="name" value="Thêm" />
                }

